<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:f="http://java.sun.com/jsf/core">
    <h:head>
        <title>Speed Dial - Add Dial</title>
    </h:head>
    <h:body>
        <ui:composition template="templates/main-template.xhtml">
            <ui:define name="title">Speed Dial - Add Dial</ui:define>
            <ui:define name="content">
                <div class="lr-margin">
                <h2>Dial Hozzáadása</h2>
                <h:form> <!-- # {request.contextPath}/ -->
                    <h:panelGrid columns="3" cellspacing="2">
                        
                        <h:outputLabel value="URL:" class="login-label"/>
                        <h:inputText id="add-url" style="width: 450px;" 
                                     validator="#{speedDialController.validateURL}"
                                     value="#{speedDialController.newURL}" class="login-input">
                            <f:ajax event="blur" render="reg-username-m" />
                        </h:inputText>
                        <h:message id="reg-username-m" for="add-url" 
                                   errorClass="form-error" warnClass="form-warn" 
                                   infoClass="form-info"/>
                        
                        <div/>
                        <h:commandButton value="Hozzáadás" action="#{speedDialController.submitAddDial}"
                                         style="width: 100px" />
                        
                    </h:panelGrid> 
                </h:form>
                </div>
            </ui:define>        
        </ui:composition>
    </h:body>
</html>

